package ai.llz.ai_pro;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.io.FileNotFoundException;

@RestController
public class DemoController {

    @Resource
    private TableService tableService;

    @PostMapping("/demotest")
    public String test(@RequestParam("question") String question){
        try {
            return tableService.getResult(question);
        } catch (Exception e) {
            return "系统出错啦";
        }
    }
}
